<%@ Page Title="" Language="C#" MasterPageFile="~/SalesOneWeb.Master" AutoEventWireup="true" CodeBehind="AddUser.aspx.cs" Inherits="IronOne.SalesOne.SalesOneWeb.AddUser" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../StyleSheets/salesOne_txtstyle.css" rel="stylesheet" type="text/css" />
    <style type="text/css">

      

    </style>
    
    <style type="text/css">
        .detailstable
        {
            width: 385px;
        }
        .style5
    {
        height: 18px;
    }
        .style7
        {}
        .style8
        {
            width: 81px;
        }
        .style9
        {
            height: 21px;
        }
        </style>
        
        <script language="javascript" type="text/javascript">

        window.onload = function() {

            var msg = document.getElementById('ctl00_MasterMsg');
            if (msg && msg.innerHTML != '')
                showMessageBlock();
        }
        </script>

    </asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <table style="width:65%;" class="detailstable">
        <tr>
            <td>
                    <asp:CreateUserWizard ID="wizCreateUser" runat="server" 
                        oncreateduser="wizCreateUser_CreatedUser1" Width="295px" 
                        LoginCreatedUser="False" 
                        onfinishbuttonclick="wizCreateUser_FinishButtonClick" 
                        CreateUserButtonType="Link">
                        <FinishCompleteButtonStyle CssClass="btn" />
                        <CreateUserButtonStyle CssClass="ph4" />
                        <FinishPreviousButtonStyle CssClass="btn" />
                        <WizardSteps>
                            <asp:CreateUserWizardStep ID="CreateUserWizardStep1" runat="server" >
                                <ContentTemplate>
                                    <table border="0" class="detailstable">
                                        <tr>
                                            <td colspan="2" class="style5"  >
                                                <b>Details</b></td>
                                        </tr>
                                        <tr>
                                            <td colspan="2" class="pix8">
                                                </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style9">
                                                <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserName" 
                                                    CssClass="lbl1">Username *:</asp:Label>
                                            </td>
                                            <td class="style9"  >
                                                <asp:TextBox ID="UserName" runat="server" CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblUsername1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                                    ControlToValidate="UserName" ErrorMessage="*">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                        <td align="left" class="style9">
                                                <asp:Label ID="lblIntraUsername" runat="server" AssociatedControlID="IntranetUserName" 
                                                    CssClass="lbl1">Intranet Username *:</asp:Label>
                                            </td>
                                            <td class="style9"  >
                                                <asp:TextBox ID="IntranetUserName" runat="server" CssClass="txtbox" MaxLength="240"></asp:TextBox>
                                                <asp:Label ID="lblIntranetUsernameInfo" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                                                    ControlToValidate="IntranetUserName" ErrorMessage="*">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                Name *:</td>
                                            <td  >
                                                <asp:TextBox ID="txtName" runat="server" 
                                                    CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblName1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                                    ControlToValidate="txtName" ErrorMessage="*">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="Password" 
                                                    CssClass="lbl1">Password *:</asp:Label>
                                            </td>
                                            <td  >
                                                <asp:TextBox ID="Password" runat="server" TextMode="Password" CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblPassword1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                                    ControlToValidate="txtName" ErrorMessage="*">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                <asp:Label ID="ConfirmPasswordLabel" runat="server" CssClass="lbl1"
                                                    AssociatedControlID="ConfirmPassword">Confirm Password *:</asp:Label>
                                            </td>
                                            <td  >
                                                <asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" 
                                                    CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblConfirmpassword1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                                                    ControlToValidate="ConfirmPassword" 
                                                    ErrorMessage="*">*</asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                ID Type*:</td>
                                            <td  >
                                                <asp:DropDownList ID="drpIdType" runat="server" CssClass="ddl">
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                    ControlToValidate="drpIdType" ErrorMessage="*" InitialValue="-1"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                ID No*:</td>
                                            <td  >
                                                <asp:TextBox ID="txtIdNo" runat="server" 
                                                    CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblIDno1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                Address:</td>
                                            <td  >
                                                <asp:TextBox ID="txtAddress1" runat="server"  
                                                    CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblAddress1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                &nbsp;</td>
                                            <td  >
                                                <asp:TextBox ID="txtAddress2" runat="server"
                                                    CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblAddress2" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style4">
                                                City:</td>
                                            <td  >
                                                <asp:TextBox ID="txtCity" runat="server" CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblCity1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                Country*:</td>
                                            <td  >
                                                <asp:DropDownList ID="drpCountry" runat="server" CssClass="ddl">
                                                </asp:DropDownList>
                                                <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                                    ControlToValidate="drpCountry" ErrorMessage="*" InitialValue="-1"></asp:RequiredFieldValidator>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5"  >
                                                <span>Gender *</span>:</td>
                                            <td  >
                                                <asp:DropDownList ID="drpGender" runat="server" CssClass="ddl">
                                                    <asp:ListItem>Male</asp:ListItem>
                                                    <asp:ListItem>Female</asp:ListItem>
                                                </asp:DropDownList>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                Contact No:</td>
                                            <td  >
                                                <asp:TextBox ID="txtContact" runat="server" CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblContactNo1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                Postal Code:</td>
                                            <td  >
                                                <asp:TextBox ID="txtPostalCode" runat="server" CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblPostalCode1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="left" class="style5">
                                                <asp:Label ID="EmailLabel" runat="server" AssociatedControlID="Email" 
                                                    CssClass="lbl1">E-mail :</asp:Label>
                                            </td>
                                            <td  >
                                                <asp:TextBox ID="Email" runat="server" CssClass="txtbox"></asp:TextBox>
                                                <asp:Label ID="lblEmail1" runat="server" Visible="False" CssClass="lbl"></asp:Label>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" colspan="2" style="color:Red;">
                                                <asp:Literal ID="ErrorMessage" runat="server" EnableViewState="False"></asp:Literal>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td align="center" colspan="2">
                                                <asp:CompareValidator ID="PasswordCompare" runat="server" 
                                                    ControlToCompare="Password" ControlToValidate="ConfirmPassword" 
                                                    Display="Dynamic" ErrorMessage="." ValidationGroup="wizCreateUser"></asp:CompareValidator>
                                                <br />
                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                                    ControlToValidate="txtPostalCode" Display="Dynamic" Enabled="False" 
                                                    ErrorMessage="." ValidationExpression="^\d*$"></asp:RegularExpressionValidator>
                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                                                    ControlToValidate="txtIdNo" Display="Dynamic" ErrorMessage="." 
                                                    ValidationExpression="^[\w\s]{0,10}$"></asp:RegularExpressionValidator>
                                                <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" 
                                                    ControlToValidate="Email" Display="Dynamic" ErrorMessage="." 
                                                    ValidationExpression="^([\w\d\-\.]+)@{1}(([\w\d\-]{1,67})|([\w\d\-]+\.[\w\d\-]{1,67}))\.(([a-zA-Z\d]{2,4})(\.[a-zA-Z\d]{2})?)$"></asp:RegularExpressionValidator>
                                            </td>
                                        </tr>
                                        <%--<tr>
                                            <td style="color:Red;">
                                                <asp:Button ID="btnNext" runat="server" CssClass="btn" onclick="btnNext_Click" 
                                                   OnClientClick="validationSummery();" Text="Next" />
                                                    </td>
                                                    <td class="style6" style="color:Red;">
                                                        <asp:Button ID="btnCancel" runat="server" CssClass="btn" 
                                                            onclick="btnCancel_Click1" Text="Cancel" />
                                            </td>
                                            <td style="color:Red;">
                                                &nbsp;</td>
                                                    <td>
                                                        &nbsp;</td>
                                        </tr>--%>
                                        <tr>
                                            <td style="color:Red;" colspan="2" class="style7">
                                                <table cellpadding="0" cellspacing="0" class="style1">
                                                    <tr>
                                                        <td class="style8">
                                                            <asp:Button ID="btnNext" runat="server" CssClass="btn" onclick="btnNext_Click" 
                                                                OnClientClick="validationSummery();" Text="Next" Width="76px" />
                                                        </td>
                                                        <td>
                                                            <asp:Button ID="btnCancel" runat="server" CssClass="btn" 
                                                                onclick="btnCancel_Click1" Text="Cancel" Width="76px" 
                                                                CausesValidation="False" />
                                                        </td>
                                                    </tr>
                                                </table>
                                                    </td>
                                        </tr>
                                        
                                        
                                        
                                        
                                        
                                    </table>
                                </ContentTemplate>
                                <CustomNavigationTemplate>
                                    <tr>
                                    <td>                                       
                                        </td>
                                    <td>
                                    </td>
                                    </tr>

                                </CustomNavigationTemplate>
                            </asp:CreateUserWizardStep>
                            <asp:WizardStep ID="WizardStep1" runat="server" Title="Add To Role" OnActivate ="On_Activate" OnDeactivate = "On_Deactivate">
                                <br />
                                <table style="width:100%;">
                                    <tr>
                                        <td class="style5" colspan="2">
                                            <b>Assigned Organization Nodes </b><span class="style6">*</span></td>
                                    </tr>
                                    <tr>
                                        <td  >
                                            User Type :</td>
                                        <td  >
                                            <asp:RadioButtonList ID="rdoUserTypes" runat="server" AutoPostBack="True" 
                                                OnSelectedIndexChanged="RadioButtonList1_SelectedIndexChanged" 
                                                RepeatDirection="Horizontal" CssClass="rdbtn">
                                            </asp:RadioButtonList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td >
                                            Group :</td>
                                        <td>
                                            <asp:DropDownList ID="drpGroup" runat="server" AutoPostBack="True" 
                                                OnSelectedIndexChanged="drpGroup_SelectedIndexChanged" CssClass="ddl">
                                                <asp:ListItem Value="-1">Select</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Branch :</td>
                                        <td>
                                            <asp:DropDownList ID="drpBranch" runat="server" AutoPostBack="True" 
                                                OnSelectedIndexChanged="drpBranch_SelectedIndexChanged" 
                                                OnLoad="drpBranch_Load" CssClass="ddl">
                                                <asp:ListItem Value="-1">Select</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Unit :</td>
                                        <td>
                                            <asp:DropDownList ID="drpUnit" runat="server" CssClass="ddl">
                                                <asp:ListItem Value="-1">Select</asp:ListItem>
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;</td>
                                        <td>
                                            &nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <b>Roles *</b></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            User Type :</td>
                                        <td>
                                            <asp:CheckBoxList ID="chkUserType" runat="server" AutoPostBack="True" 
                                                OnSelectedIndexChanged="chkUserType_SelectedIndexChanged" 
                                                RepeatDirection="Horizontal" RepeatLayout="Flow" Width="200px">
                                            </asp:CheckBoxList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            &nbsp;</td>
                                        <td>
                                            <b>Role Description</b></td>
                                    </tr>
                                    <tr>
                                        <td>
                                            Roles :
                                        </td>
                                        <td>
                                            <asp:CheckBoxList ID="chkRoles" runat="server" CssClass="chbox" 
                                                OnSelectedIndexChanged="chkRoles_SelectedIndexChanged" Width="100px">
                                            </asp:CheckBoxList>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                                ControlToValidate="rdoUserTypes" Display="Dynamic" 
                                                ErrorMessage="Please select a user type."></asp:RequiredFieldValidator>
                                            <asp:RequiredFieldValidator ID="reqNode" runat="server" 
                                                ControlToValidate="drpGroup" Display="Dynamic" 
                                                ErrorMessage="Please select a node."></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td  colspan="2">
                                            <asp:Label ID="lblError" runat="server" ForeColor="Red" CssClass="lbl"></asp:Label>
                                        </td>
                                    </tr>
                                </table>
                                <br />
                            </asp:WizardStep>
                            <asp:CompleteWizardStep ID="CompleteWizardStep1" runat="server" >
                                <ContentTemplate>
                                    <table border="0" style="font-size:100%;width:452px;">
                                        <tr>
                                            <td align="center" colspan="2" class="style5">
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td class="style4">
                                                &nbsp;</td>
                                        </tr>
                                        <tr>
                                            <td align="right" colspan="2">
                                                <asp:Button ID="ContinueButton" runat="server" CausesValidation="False" 
                                                    CommandName="Continue" Text="Continue" ValidationGroup="wizCreateUser" 
                                                    onclick="ContinueButton_Click1" CssClass="btn" />
                                            </td>
                                        </tr>
                                    </table>
                                </ContentTemplate>
                            </asp:CompleteWizardStep>
                            
                            
                           
                        </WizardSteps>
                    </asp:CreateUserWizard>
                    &nbsp;&nbsp;&nbsp;
            </td>
            <td>
                </td>
            <td  >
                </td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td  >
                &nbsp;</td>
        </tr>
    </table>
</asp:Content>
